package com.tinycloud.miracll.product.service.impl;

import java.util.List;

import com.tinycloud.common.datasource.annotation.Slave1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tinycloud.miracll.product.mapper.ErpQCMMainMapper;
import com.tinycloud.miracll.product.domain.ErpQCMMain;
import com.tinycloud.miracll.product.service.IErpQCMMainService;

/**
 * 品管号主表Service业务层处理
 * 
 * @author tiny
 * @date 2022-06-15
 */
@Service
@Slave1
public class ErpQCMMainServiceImpl implements IErpQCMMainService {
    @Autowired
    private ErpQCMMainMapper erpQCMMainMapper;

    /**
     * 查询品管号主表
     * 
     * @param qcNum 品管号主表主键
     * @return 品管号主表
     */
    @Override
    public ErpQCMMain selectErpQCMMainByQcNum(String qcNum) {
        return erpQCMMainMapper.selectErpQCMMainByQcNum(qcNum);
    }

    /**
     * 查询品管号主表列表
     * 
     * @param erpQCMMain 品管号主表
     * @return 品管号主表
     */
    @Override
    public List<ErpQCMMain> selectErpQCMMainList(ErpQCMMain erpQCMMain) {
        return erpQCMMainMapper.selectErpQCMMainList(erpQCMMain);
    }

    /**
     * 新增品管号主表
     * 
     * @param erpQCMMain 品管号主表
     * @return 结果
     */
    @Override
    public int insertErpQCMMain(ErpQCMMain erpQCMMain) {
        return erpQCMMainMapper.insertErpQCMMain(erpQCMMain);
    }

    /**
     * 修改品管号主表
     * 
     * @param erpQCMMain 品管号主表
     * @return 结果
     */
    @Override
    public int updateErpQCMMain(ErpQCMMain erpQCMMain) {
        return erpQCMMainMapper.updateErpQCMMain(erpQCMMain);
    }

    /**
     * 批量删除品管号主表
     * 
     * @param qcNums 需要删除的品管号主表主键
     * @return 结果
     */
    @Override
    public int deleteErpQCMMainByQcNums(String[] qcNums) {
        return erpQCMMainMapper.deleteErpQCMMainByQcNums(qcNums);
    }

    /**
     * 删除品管号主表信息
     * 
     * @param qcNum 品管号主表主键
     * @return 结果
     */
    @Override
    public int deleteErpQCMMainByQcNum(String qcNum) {
        return erpQCMMainMapper.deleteErpQCMMainByQcNum(qcNum);
    }
}
